import {TASK} from '@/services/api'
import {request, METHOD} from '@/utils/request'

export async function listTaskWorkloadVOByPage(currentPage, size) {
    return request(TASK+"/page", METHOD.GET, {
        currentPage: currentPage,
        size: size
    })
}

export async function totalTaskWorkloadVO() {
    return request(TASK+"/total", METHOD.GET)
}


export async function listTaskVOByTeacherId(id) {
    return request(TASK, METHOD.GET, {
        teacherId: id
    })
}

export async function saveTask(task) {
    return request(TASK, METHOD.POST, {
        id: task.id,
        teacherId: task.teacherId,
        planId: task.planId,
        actualNum: task.actualNum,
        commonNum: task.commonNum,
        maxNum: task.maxNum
    })
}

export async function deleteTask(id) {
    return request(TASK, METHOD.DELETE, {
        id: id
    })
}

